<?php
include_once dirname(__FILE__)."/../config/functions.php";
include_once dirname(__FILE__).'/header.php';
?>
<div id="page-wrapper">

    <div class="row">
        <div class="col-lg-12">
            <?php
            //get member data
            if (!isset($_GET['id']) || !$_GET['id']):
                ?>
                <div class="alert alert-danger">
                    Sponsor Ad Not Found.
                </div>
                <?php
            else:
                $sponsor = mysql_query("select * from ads where id = " . $_GET['id']);
                $row = mysql_fetch_assoc($sponsor);
                if ($row):
                    ?>
                    <div class="row text-center" style="margin-top: 50px;">
                        <p><strong>Are you sure you want to delete Sponsor Ad with ID <?php echo $row['id']; ?>.</strong></p>
                        <a class="btn btn-primary" role="button" href="sponsor-delete.php?id=<?php echo $row['id']; ?>">Delete</a>
                        <a class="btn btn-default" href="sponsors.php" role="button">Cancel</a>
                    </div>
                <?php else: ?>
                    <div class="alert alert-danger">
                        Sponsor Ad Not Found.
                    </div>
                <?php endif; ?>
            <?php endif; ?>

        </div>
    </div><!-- /.row -->

</div><!-- /#page-wrapper -->

<?php include_once dirname(__FILE__).'/footer.php'; ?>